import java.sql.SQLOutput;

public class test3 {
    public static void main(String[] args) {
        String  s = "123";
        //int a = Integer.valueOf(s);
        int a = Integer.parseInt(s);
        //这两种都行 一般是用第二种
        System.out.println(a+1);

    }


    public static void main4(String[] args) {
        int a = 123;
        String str = a+"";//整形转字符串
        System.out.println(str);
        System.out.println("我也不知道写的啥");
        String str1 = String.valueOf(a);//整形变字符串
        System.out.println(str1);
    }


    public static void main3(String[] args) {
        int a = 10;
        System.out.println("a = " + a);
        System.out.printf("a = %d\n",a);//两种写法

        int c = 20;
        System.out.println("a == " +a + c);
        System.out.println("a == " +(a + c));
        System.out.println(a + c + " =a+c");
    }



    public static void main2(String[] args) {
        String str = "hello";
        System.out.println(str.charAt(0));
    }


    public static void main1(String[] args) {
        String str = "hello";
        String str2 = "word";
        System.out.println(str +str2); //使用加号可以对字符拼接
        System.out.println(str.length());
        //java当中 说字符串的时候 没有所谓的\0结尾的说话！
    }
}
